﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Intranet.Models.activity>>" %>
<% foreach (var item in Model)
   {
       if (!item.parentId.HasValue) // only render if there is no 
       {
           if (DateTime.Compare(item.dueDate, DateTime.Now) < 0)
           {
               // warning background div - overdue activity
               %><div class="ParentActivity warning"><%
           }
           else
           {
               // normal div
               %><div class="ParentActivity"><%
           }
           Html.RenderPartial("ParentActivity", item);
           %></div><%
       }
   } %>